package org.cuit.epoch.seon.combat;

import lombok.Data;

/**
 * @author Seon
 * @version 1.0
 * @since 2024-09-13
 */
@Data
public class TextEditor {
    private String text;

    public void show() {
        System.out.println("text = " + text);
    }

    public Memento save() {
        Memento memento = new Memento();
        memento.setState(text);
        return memento;
    }

    public void restore(Memento memento) {
        text = memento.getState();
    }
}
